<h1>Listing authors</h1>

<table>
  <thead>
    <tr>
      <th>Username</th>
      <th>Email</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% @authors.each do |author| %>
      <tr>
        <td><%= author.username %></td>
        <td><%= author.email %></td>
        <td><%= link_to 'Show', author %></td>
        <td><%= link_to 'Edit', edit_author_path(author) %></td>
        <td><%= link_to 'Destroy', author, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Author', new_author_path %>
